<?php

namespace app\admin\model;

class Customer extends Base
{
    // 表名
    protected $name = 'bd_customer';


    public function bizperson()
    {
        return $this->hasOne('Bizperson', 'id', 'fk_bdl_bd_salesperson',[],'LEFT')->setEagerlyType(0);
    }
    public function cust()
    {
        return $this->hasOne('Bizperson', 'id', 'fk_bdl_bd_salesperson');
    }
    public function address()
    {
        return $this->hasMany("Customeraddress",'fk_bdl_bd_customer','id');
    }
}
